﻿using System;
using System.Collections.Generic;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.pp.processor.type.comm;
using SharpSqlAnalyzer.stmt;

namespace SharpSqlAnalyzer.pp.stmtformatter.type.comm
{
	// Token: 0x0200020C RID: 524
	public class MergeStmtFormatter : AbstractStmtFormatter
	{
		// Token: 0x06001220 RID: 4640 RVA: 0x0031807E File Offset: 0x0031627E
		protected internal virtual MergeStmtFormatter newInstanceFormatter()
		{
			return new MergeStmtFormatter();
		}

		// Token: 0x06001221 RID: 4641 RVA: 0x00318088 File Offset: 0x00316288
		protected internal override void doFormat(TCustomSqlStatement stmtArg)
		{
			TMergeSqlStatement tmergeSqlStatement = stmtArg as TMergeSqlStatement;
			this.runProcessor<TMergeSqlStatement>(this.SpecialProcessors, tmergeSqlStatement);
			if (tmergeSqlStatement.Condition != null)
			{
				this.runProcessor<TExpression>(this.onExpProcessors, tmergeSqlStatement.Condition);
			}
		}

		// Token: 0x06001222 RID: 4642 RVA: 0x003180C3 File Offset: 0x003162C3
		public virtual void addOnExpProcessors(AbstractProcessor p)
		{
			if (this.onExpProcessors == null)
			{
				this.onExpProcessors = new List<AbstractProcessor>();
			}
			this.onExpProcessors.Add(p);
		}

		// Token: 0x040013DE RID: 5086
		private IList<AbstractProcessor> onExpProcessors;
	}
}
